import request from './request'

// 普通的get请求
// export const GetHomeLists = () => request.get('/index/index')
//传参的get请求
// export const GetSearchTipListData = (params) => request.get("/search/helper", { params })
// post传参请求
// export const GetLoginData = (params) => request.post("/auth/loginByWeb", params)

// 登录请求/login
export const GetLoginData = (params) => request.post("/login", params)

//全部订单接口请求  /order/v1/list
export const GetOrderAllData = (params) => request.get("/order/v1/list", { params })

// 代发货订单接口请求  /order/v1/list/1
export const GetOrderSondData = (params) => request.get("/order/v1/list/1", { params })

// 待收货请求接口  /order/v1/list/2
export const GetOrderGetData = (params) => request.get("/order/v1/list/2", { params })

// 待评价单接口请求  /order/v1/list/3
export const GetOrderPj = (params) => request.get("/order/v1/list/3", { params })

// 订单详情请求，用来渲染发货详情页面  /order/v1/orderInfo/{serialNo}
export const GetOrderXiangQing = (params) => request.get("/order/v1/orderInfo/" + params.serialNo)

// 发货请求  /order/v1/send
export const FaHuo = (params) => request.post("/order/v1/send", params)

// 确认收货请求  /order/v1/confirmReceipt/{serialNo}
export const QueRenShouhuo = (params) => request.post("/order/v1/confirmReceipt/" + params.serialNo)

// 提交评论请求  /order/v1/evaluate
export const TiJiaoPingLun = (params) => request.post("/order/v1/evaluate", params)
// export const TiJiaoPingLun = (params) => request.post("/order/v1/evaluate/" + params.serialNo)

// 评论详情请求  /order/v1/evaluateInfo/{serialNo}
export const PingLunXiangQing = (params) => request.get("/order/v1/evaluateInfo/" + params.serialNo)

// 个人中心用户信息展示请求  /users/list
export const GetUserLists = () => request.get('/users/list')

// 用户信息详情  /users/info
export const GetUserInfoLists = () => request.get('/users/info')

// 版本信息请求  /users/version
export const GetUserBanbenLists = () => request.get('/users/version')

// 信息中心列表请求  /api/message
export const GetMessageList = (params) => request.get("/api/message", { params })

// 消息详情页请求  /api/message/{id}
export const MessageXiangQing = (params) => request.get("/api/message/" + params.id)

// 标记信息为已读  /api/message/updates
export const GetMessageisRead = (params) => request.put(`/api/message/updates?id=${params.id}`, params)

// 物流单列表请求  /api/star
export const GetStarList = (params) => request.get("/api/star", { params })

//物流单评价请求  /api/star
export const PutStarPingjia = (params) => request.put(`/api/star?id=${params.id}`, params)

//物流单评价详情  /api/star/{id}
export const StarXiangQing = (params) => request.get("/api/star/" + params.id)


// 客户列表信息请求  /api/cust
export const GetCustList = (params) => request.get("/api/cust", { params })

// 客户视图信息请求  /api/cust/{id}
export const GetCustWatch = (params) => request.post("/api/cust/" + params.id)

// 客户详细信息请求  /api/cust/{id}
export const GetCustInfo = (params) => request.get("/api/cust/" + params.id)

// 修改客户信息  /api/cust
export const PutCustInfo = (params) => request.put(`/api/cust?id=${params.id}`, params)

// 新增客户信息请求  /api/cust
export const AddCustInfo = (params) => request.post("/api/cust", params)


// 客户关怀列表请求  /api/visit
export const GetVisitList = (params) => request.get("/api/visit", { params })

// 新增拜访请求  /api/visit
export const AddVisit = (params) => request.post("/api/visit/", params)

// 拜访详情请求  /api/visit/{id}
export const GetVisitinfo = (params) => request.get("/api/visit/" + params.id)